import { pascalCase } from '@gis/lib/utils';

// const files = import.meta.glob('./js/*.js');
const files = import.meta.glob('./js/*.js', { eager: true, import: 'default' });

// console.log('marker index.js files: ', files);

const modules = {};
for (const key in files) {
  const file = files[key];
  const name = pascalCase(key.replace(/(\.\/js\/|\.js)/g, ''));
  modules[name] = file;
}

// console.log('marker index.js modules: ', modules);

export default modules;
